package com.kunlun.system.rpc;

import com.kunlun.common.model.ResponseMessage;
import com.kunlun.common.model.monitor.SystemDataModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "kunlun-basedata-service")
public interface FeignBasedataService {

    @RequestMapping(value = "/redis/set", method = RequestMethod.POST)
    Object set(@RequestParam(value = "key") String key, @RequestParam(value = "value") String value, @RequestParam(value = "expire") int expire, @RequestParam(value = "dataBase") int dataBase);

    @RequestMapping(value = "/redis/get", method = RequestMethod.GET)
    Object get(@RequestParam(value = "key") String key, @RequestParam(value = "dataBase") int dataBase);

    @RequestMapping(value = "/user/getUserInfo", method = RequestMethod.GET)
    Object getUserByUserName(@RequestParam(value = "userName") String userName);

    @RequestMapping(value = "/commonApi/monitorSystem", method = RequestMethod.GET)
    ResponseMessage<SystemDataModel> monitorSystem();
}
